pub mod auth;
pub mod profile;
pub mod url;
pub mod user;

use serde::Deserialize;
use validator::Validate;

#[derive(Deserialize, Validate, Default)]
#[serde(default)]
pub struct Page {
    pub page: Option<String>,
}

impl Page {
    pub fn page(&self) -> u32 {
        match &self.page {
            Some(v) => v.parse().unwrap_or(0),
            None => 0,
        }
    }
}
